
export default  {
    data() {
      return {
        count: 10000,
        countDownText: '00:00:00'
      }
    },
    methods: {
    },
    created() {
      this.interval = setInterval(() => {
        this.count -= 1000
        if (this.count <= 0) {
          clearInterval(this.interval)
        }
        const h = Math.floor(this.count / 1000 / 60 / 60)
        const m = Math.floor(this.count / 1000 / 60 % 60)
        const s = Math.floor(this.count / 1000 % 60)
        this.countDownText = `${h}:${m}:${s}`
      }, 1000)
    },
    beforeDestroy() {
      clearInterval(this.interval)
    }
  }